package com.my.chapter7;

public class practice17 {
    public static void main(String[] args) {
        Frog1 f =new Frog1();
        f.play();
        f.display();
        Amphibian1 a =(Amphibian1) f;
        a.play();
    }
}

class Amphibian1{
    void play(){
        System.out.println("Amphibian play()");
    }
}

class Frog1 extends Amphibian1{
    void display(){
        System.out.println("Frog display()");
    }
    void play(){
        System.out.println("Frog play()");
    }
}

